import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/index.vue'
import Default from '../views/defalut.vue'
import Vedio from '../views/vedio.vue'
import Music from '../views/music.vue'
import Member from '../views/member.vue'
import VedioDetail from '../views/vediodetail'
import VIPrecharge from '../views/VIPrecharge'
import cardCollecting from '../views/cardCollecting'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/index',
    name:'default',
    component:Default,
    children:[
      {
        path: '/index',
        name: 'index',
        component: Index
      },
      {
        path: '/vedio',
        name: 'vedio',
        component: Vedio
      },
      {
        path: '/music',
        name: 'music',
        component: Music
      },
      {
        path: '/member',
        name: 'member',
        component: Member
      },
      {
        path: '/vediodetail',
        name: 'vediodetail',
        component: VedioDetail
      },
      {
        path: '/cardCollecting',
        name: 'cardCollecting',
        component: cardCollecting
      }
    ]
  },
  {
    path: '/VIPrecharge',
    name: 'VIPrecharge',
    component: VIPrecharge
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
